<template>
	<view style="height: 100vh; background-color: #FFFFFF;">
		<u-navbar title-color="#FFFFFF" height="48" back-icon-color="#FFFFFF" :border-bottom="false" :is-fixed="true"
			:title="'录制视频'"></u-navbar>
		<uc-content>
			<view class="parent">
				<view class="chindren"  @tap="recording">
					<view>
						<u-icon name="warning-fill" color="#2979ff" size="80"></u-icon><br>
						<view class="u-m-t-20">
							录制视频
						</view>
					</view>
				</view>
				<view class="chindren"  @tap="skip">
					<view>
						<u-icon name="warning-fill" color="#2979ff" size="80"></u-icon><br>
						<view class="u-m-t-20">
							跳过录制，直接灭火
						</view>
					</view>
				</view>
			</view>
		</uc-content>	
	</view>
</template>

<script>
	export default {
		data() {
			return {
				ucId: '',
				noticeId: '',
			}
		},
		onLoad(val) {
			this.ucId = val.ucId
			this.noticeId = val.noticeId
			if(val.mark == 1){
				
				this.utils.request("/api/app/user/getUserInfo", {}, "get", "app", true).then(res => {
					this.$store.commit('webSocket/WEB_SOCKET_INIT', res.data.ucId)
				}).catch(error => {
					console.log(error)
				})
				
			}
		},
		methods: {
			skip(){
				uni.navigateTo({
					url:"/pages/index/abnormal/returnedSuccessfully?noticeId=" + this.noticeId + "&fireInfoId=" + this.ucId + "&audioId=1"
				})
			},
			recording(){
				window.native.RecordVideo({ucId:this.ucId, regionId: this.noticeId});
			}
		}
	}
</script>

<style scoped>
	.parent{
		 display: flex;
		 flex-direction: column;
		 height: calc(100vh - 48px);
		 width: 100%;
	}
	.chindren{
		 text-align: center;
		 flex:1;
		 padding: 100rpx;
		 border-bottom: #333333 1rpx solid;
	}
	
</style>
